package javase.homework;

import java.util.ArrayList;

public class Question {
	private String id;
	private String title;
	private ArrayList<String> options=new ArrayList<String>();
	private String answer;
	private int score;
	
	public Question(String id, String title, ArrayList<String> options,
			String answer, int score) {
		super();
		this.id = id;
		this.title = title;
		this.options = options;
		this.answer = answer;
		this.score = score;
	}
	public Question(String id, String title, ArrayList<String> options,
			String answer) {
		super();
		this.id = id;
		this.title = title;
		this.options = options;
		this.answer = answer;
	}
	public Question() {
		super();
		// TODO Auto-generated constructor stub
	}
	public Question(String id, String desc, ArrayList<String> options) {
		super();
		this.id = id;
		this.title = desc;
		this.options = options;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getDesc() {
		return title;
	}
	public void setDesc(String desc) {
		this.title = desc;
	}
	public ArrayList<String> getOptions() {
		return options;
	}
	public void setOptions(ArrayList<String> options) {
		this.options = options;
	}
	
	public String toString(){
		StringBuffer sb=new StringBuffer(id+"."+title+"\n");
		for(int i=0;i<options.size();i++){
			sb.append((char)(i+'A')+"."+options.get(i)+"\n");
		}

		sb.append("\n");
		return sb.toString();
	}
	public void setAnswer(String answer) {
		this.answer = answer;
	}
	public String getAnswer() {
		return answer;
	}
	public static void main(String[] args) {
		ArrayList<String> options1=new ArrayList<String>();
		options1.add("1945");
		options1.add("1949");
		options1.add("1937");
		options1.add("1921");
		
		Question q=new Question("1", "中国什么时候解放？", options1,"A");
		System.out.println(q.toString());
	}
	public void setScore(int score) {
		this.score = score;
	}
	public int getScore() {
		return score;
	}
	
}
